﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using HCMServices.DAO;
using HCMServices.DTO;
using System.Collections.Generic;

namespace HCMServices.Tests.TESTDAO
{
    /// <summary>
    /// Unit test for KeyServiceDAO class
    /// </summary>
    [TestClass]
    public class TestKeyServiceDAO
    {
        /// <summary>
        /// Unit test for Search() method in KeyServiceDAO class
        /// </summary>
        [TestMethod]
        public void TestSearch()
        {
            string connectString = "Data Source = isostore:/Database.sdf";

            KeyServiceDAO keyServiceDao = new KeyServiceDAO(connectString);
            List<KeyServiceDTO> listKeyServiceDTO = null;
            listKeyServiceDTO = keyServiceDao.Search("bv");
            if (listKeyServiceDTO != null && listKeyServiceDTO.Count > 0 && listKeyServiceDTO[0].ServiceId == 1 && listKeyServiceDTO[0].KeyServiceId == 283 && listKeyServiceDTO[0].KeyService == "bv")
            {
                Assert.IsTrue(true);
                return;
            }

            Assert.IsFalse(true);
        }
    }
}
